<?php

namespace app\command\command;

use think\console\Command;
use think\console\Input;
use think\console\Output;
use mumbaicat\makeapidoc\ApiDoc;

class updateApiDoc extends Command
{
    protected function configure()
    {
        $this->setName('updateApiDoc')
            ->setDescription('生成Api文档');
    }

    protected function execute(Input $input, Output $output)
    {
        $doc = new ApiDoc(APP_PATH, getcwd() . DIRECTORY_SEPARATOR . 'public' . DIRECTORY_SEPARATOR);
        $doc->setName('api');
        $doc->make();

        echo 'SUCCESS';
    }
}
